﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once

#include "GcmpGeometryInterface.h"
#include "IDbObject.h"

namespace gcmp
{
    /// \brief 静态轮廓线曲面类型
    enum class StaticContourSurfaceType : int32_t
    {
        Sphere = 0,///< 球面
        Cylinder = 1, ///< 圆柱面
        Cone = 2, ///< 锥面
        Torus = 3, ///< 圆环面
        Nurbs = 4  ///< 样条曲面
    };

    /// \brief 静态轮廓线曲面分割份数信息接口
    class GCMP_GEOMETRY_INTERFACE_EXPORT IStaticContoursSegmentInfo : public IDbObject
    {
        DEFINE_CAST_DERIVED(gcmp::IStaticContoursSegmentInfo, gcmp::IDbObject);

    public:
        virtual ~IStaticContoursSegmentInfo() {}

        /// \brief 创建IStaticContoursSegmentInfo
        /// \return 静态轮廓线曲面分割份数信息类
        static OwnerPtr<IStaticContoursSegmentInfo> Create();

        /// \brief 获取静态轮廓线在U向将给定曲面类型分割的份数
        /// \param surfType 曲面类型
        /// \return 是否设置成功
        virtual int GetSegmentNumU(StaticContourSurfaceType surfType) const = 0;

        /// \brief 设置静态轮廓线在U向将给定曲面类型分割的份数
        /// \param surfType 曲面类型
        /// \param segmentCountsU 曲面U方向分割份数,应为大于0的整数
        /// \return 是否设置成功
        virtual bool SetSegmentNumU(StaticContourSurfaceType surfType, int segmentCountsU) = 0;

        /// \brief 获取静态轮廓线在V向将给定曲面类型分割的份数
        /// \param surfType 曲面类型
        /// \return 曲面V方向分割份数，曲面类型参数不合法返回-1
        virtual int GetSegmentNumV(StaticContourSurfaceType surfType) const = 0;

        /// \brief 设置静态轮廓线在V向将给定曲面类型分割的份数
        /// \param surfType 曲面类型
        /// \param segmentCountsV 曲面V方向分割份数,应为大于0的整数
        /// \return 是否设置成功
        virtual bool SetSegmentNumV(StaticContourSurfaceType surfType, int segmentCountsV) = 0;
    };
}
